<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<!-- <meta name="viewport" content="width=device-width,initial-scale=1" /> -->
<link rel="shortcut icon" th:href="@{/admin/images/favicon.png}" />
<title>Shining Blog - 用户登录</title>
<link
	th:href="@{//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css}"
	rel="stylesheet" />
<!-- <link -->
<!-- 	th:href="@{//cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css}" -->
<!-- 	rel="stylesheet" type="text/css" /> -->
<!-- <link th:href="@{/admin/css/style.min.css}" rel="stylesheet" -->
<!-- 	type="text/css" /> -->
<link
	th:href="@{//cdn.bootcss.com/limonte-sweetalert2/6.4.1/sweetalert2.min.css}"
	rel="stylesheet" />
<link rel="stylesheet" type="text/css" 
	href="/admin/css/register-login.css">
</head>
<body>
	<div id="box"></div>
	<div class="cent-box">
		<div class="cent-box-header">
			<h1 class="main-title hide">Shining Blog</h1>
			<h2 class="sub-title">生活热爱分享 - Shining Blog</h2>
		</div>

		<div class="cont-main clearfix">
			<div class="index-tab">
				<div class="index-slide-nav">
					<a th:href="@{/admin/login}" class="active">登录</a> <a
						th:href="@{/admin/register}">注册</a>
					<div class="slide-bar"></div>
				</div>
			</div>

			<div class="login form">
				<form class="form-horizontal m-t-20" method="post" id="loginForm"
					onsubmit="return checkForm()">
					<div class="group">
						<div class="group-ipt username">
							<input type="text" name="username" id="username" class="ipt"
								placeholder="邮箱地址" required="">
						</div>
						<div class="group-ipt password">
							<input type="password" name="password" id="password" class="ipt"
								placeholder="输入您的登录密码" required="">
						</div>
					</div>
					<div class="form-group">
						<div class="col-xs-12">
							<div class="checkbox checkbox-danger">
								<input id="checkbox-signup" name="remeber_me" type="checkbox" />
								<label for="checkbox-signup">记住我</label>
							</div>
						</div>
					</div>
					<div class="button">
						<button type="submit" class="login-btn register-btn" id="button">登录</button>
					</div>
				</form>
			</div>
		</div>
	</div>

	<div class="footer">
		<p>Shining Blog</p>
		<p>Designed By XuYaoRong 2019</p>
	</div>

	<script th:src="@{//cdn.bootcss.com/jquery/2.2.3/jquery.min.js}"></script>
	<script
		th:src="@{//cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js}"></script>
	<script
		th:src="@{//cdn.bootcss.com/limonte-sweetalert2/6.4.1/sweetalert2.min.js}"></script>
	<script th:src="@{/admin/js/particles.js}" type="text/javascript"></script>
	<script th:src="@{/admin/js/background.js}" type="text/javascript"></script>
	<script th:src="@{/admin/js/jquery.min.js}" type="text/javascript"></script>
	<script th:src="@{/admin/js/layer/layer.js}" type="text/javascript"></script>
	<script th:src="@{/admin/js/base.js}"></script>
	<script type="text/javascript">
		/*<![CDATA[*/
		var tale = new $.tale();
		function checkForm() {
			tale.post({
				url : '/admin/login',
				data : $("#loginForm").serialize(),
				success : function(result) {
					if (result && result.success) {
						window.location.href = '/admin/index';
					} else {
						tale.alertError(result.msg || '登录失败');
					}
				}
			});
			return false;
		}
		/*]]>*/
	</script>
</body>
</html>